package com.itheima.mapper;

import com.itheima.domain.SysRole;
import com.itheima.domain.SysUser;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ClassName:SysRoleMapper
 * Package:com.itheima.mapper
 * Description:
 * Date:2021/11/5 18:18
 * Author:liu.min
 */
public interface SysRoleMapper {
  /*  private int id;
    private String rolrname;
    private String roledesc;*/

    @Select("select * from sys_role where id=#{id}")
    public SysRole findById(int id);

    @Select("SELECT * FROM sys_user_role m,sys_role r WHERE m.roleId=r.id AND m.userId=#{id}")
    public List<SysRole> findAllbymidTbId(int id);
}
